<!-- 搜索页面 search 2015-07-15 -->
<?php $this->load->view('home/layout/header') ?>
<div class="search widthMax">
    <div class="searchHead am-cf">
        <form method="get" action="<?php echo site_url('scenic/search/index'); ?>" class="form-index">
            <div class="searchBox flex">
                <div class="customSelect">
                    <div class="type">
                        <span data-type="jq">景区</span>
                        <i class="iconfont">&#xe664;</i>
                    </div>
                    <ul class="chose">
                        <li data-url="<?php echo site_url('scenic/search/index');?>" >景区</li>
                        <li data-url="<?php echo site_url('tourism/goods/search');?>" >商品</li>
                        <li data-url="<?php echo site_url('line/account/grid');?>" >度假</li>
                        <li data-url="<?php echo $this->config->www_base_url.'wap/hotel/wap_hotel.html';?>">酒店</li>
                    </ul>
                </div>
                <input type="text" class="flex-1" placeholder="请输入关键字" name="keyword"/>
            </div>
        </form>
        <a href="javascript:history.go(-1)">取消</a>
    </div>
    <div class="searchList">
        <?php if ( !empty($historySearch) ): ?>
        <div class="historySearch">
            <p>
                <span>历史搜索</span>
                <i class="iconfont">&#xe636;</i>
            </p>
            <ul class="list am-cf">
                    <?php foreach ($historySearch as $key => $val ): ?>
                        <?php if ($val['type'] == 1): ?>
                            <li><a href="<?php echo site_url('/scenic/search/index').'?keyword='.(!empty($val['keyword']) ? $val['keyword'] : '杭州');?>"><?php echo !empty($val['keyword']) ? $val['keyword'] : '杭州';?></a></li>
                        <?php endif ?>
                        <?php if ($val['type'] == 2): ?>
                            <li><a href="<?php echo site_url('/tourism/goods/search').'?keyword='.(!empty($val['keyword']) ? $val['keyword'] : '杭州');?>"><?php echo !empty($val['keyword']) ? $val['keyword'] : '杭州';?></a></li>
                        <?php endif ?>
                    <?php endforeach ?>
            </ul>
        </div>
        <?php endif ?>
        <?php if ($hotSearch->num_rows() >0): ?>
            <div class="hotSearch">
                <p>热门搜索</p>
                <ul class="list am-cf">
                    <?php foreach ($hotSearch->result() as $key => $val ): ?>
                        <?php if ($val->type == 1): ?>
                            <li><a href="<?php echo site_url('scenic/search/index').'?keyword='.$val->keyword;?>"><?php echo $val->keyword;?></a></li>
                        <?php endif ?>
                        <?php if ($val->type == 2): ?>
                            <li><a href="<?php echo site_url('tourism/goods/search').'?keyword='.$val->keyword;?>"><?php echo $val->keyword;?></a></li>
                        <?php endif ?>
                    <?php endforeach ?>
                </ul>
            </div>
        <?php endif ?>
    </div>
</div>
<?php $this->load->view('home/layout/footer') ?>